import java.util.HashMap;
import java.util.Map;

/**
 * @作者：ldk
 * @描述：默认描述
 * @修改描述：默认描述
 */
public class Main {

    public static Map<Integer,Integer> searchNum(int[] nums){
        Map<Integer,Integer> map = new HashMap<>();
        for (int num : nums){
            map.put(num,map.getOrDefault(num,0) + 1);
        }
        return map;
    }

    public static void main(String[] args) {
        int[] nums = {1,2,1,3,4,5,6,7,8,9,10,11,12,2,3,4,5,8,8,8,6,7,11,10,9};

        Map<Integer, Integer> map = searchNum(nums);
        System.out.println(map.toString().replaceAll("=","-"));
    }
}
